package cn.iocoder.yudao.module.digital.service.cardchannel.model;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * Description:
 * Author: li
 * Date: 2024/2/21
 */
@Data
public class GenerateEGiftResponse {
    private String entityId; // A reference to the URI for the eGift.For Void eGift, the string at the end of this value should be used to obtain the eGiftId.
    private String creatorId; // A reference to the URI for the person that created the entity
    private String updaterId; // A reference to the URI for the person that last updated the entity
    private String createdTimestamp; // Date and time (UTC) at which the entity got created
    private String updatedTimestamp; // Date and time (UTC) at which the entity was last updated
    private String transactionId; // A unique value assigned by the BHN Transaction System that can be used for Settlement.
    private String giftFrom; // EGift sender email address
    private String giftTo; // EGift sender email address
    private String giftMessage; // Gift Message
    private String accountId; // A reference to the URI for the account associated with the EGift
    private String retrievalReferenceNumber; // Retrieval Reference Number for the EGIFT transaction. It must be 12 alpha-numeric characters.
    private String productConfigurationId; // A reference to the URI for the product configuration entity associated with the EGift
    private BigDecimal giftAmount; // The amount associated with the eGift
    private String giftCurrency; // The 3 letter representation of the currency assocated with the eGift amount. eg: USD
    private String status; // Status of the eGift.
    private Boolean suspended; // Boolean to indicate if the eGift is suspended.
    private Integer riskScore;
    private Boolean hasBeenViewed;
    private EGiftDetails eGiftDetails; // EGiftDetails
    /**
     * BHN product UPC. Default IID must be set up for UPC if upc will be used for product info in request.
     *
     * Either upc or productConfigurationId should be provided
     */
    private String upc;
    /**
     * Information regarding Person Purchasing Card
     *
     * compliance mandated
     */
    private User purchaserInfo;
    private User recipientInfo; // Information regarding Person Receiving Card

    @Data
    public static class EGiftDetails {
        private List<AdditionalAttribute> additionalAttributes; // The list of Entity Attribute of the EGift

    }

    @Data
    public static class AdditionalAttribute {
        private String id;
        private String name;
        private String type;
        private String value;
        private String createdTimestamp;
        private String updatedTimestamp;

    }

    @Data
    public static class User {
        private String firstName; // First Name of Person
        private String lastName; // Last Name of Person
        private String addressLine1; // Address Line 1
        private String addressLine2; // Address Line 2
        private String city;
        /**
         * State or Province (Required for Purchaser Info)
         *
         * Used to enforce restricted product compliance mandates.
         * If state (or Province) is not supported for the country of purchase, postalCode must be sent instead.
         */
        private String state;
        private String postalCode; // Postal Code
        private String countryCode; // Country Code (Required for Purchaser Info in ISO 3166 alpha 3 format)
        private String phoneNumber;
        private String emailAddress;

    }
}

